<template>
  <view class="schedule-page">
    <!-- 头部区域 -->
    <view class="header">
      <text class="title">My Schedule</text>
      <view class="filter-section">
        <view class="filter-item active">
          <text class="filter-text">Upcoming</text>
        </view>
        <view class="filter-item">
          <text class="filter-text">Past</text>
        </view>
      </view>
    </view>

    <!-- 行程列表 -->
    <view class="schedule-list">
      <view class="schedule-card" v-for="(item, index) in schedules" :key="index">
        <view class="schedule-image-container">
          <image :src="item.image" mode="aspectFill" class="schedule-image" />
          <view class="schedule-status">
            <text class="status-text">{{ item.status }}</text>
          </view>
        </view>
        <view class="schedule-info">
          <text class="schedule-title">{{ item.title }}</text>
          <view class="schedule-meta">
            <view class="schedule-location">
              <image src="/static/images/location-icon.svg" mode="aspectFit" class="location-icon" />
              <text class="location-text">{{ item.location }}</text>
            </view>
            <view class="schedule-date">
              <image src="/static/images/calendar-icon.svg" mode="aspectFit" class="calendar-icon" />
              <text class="date-text">{{ item.date }}</text>
            </view>
          </view>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  name: 'TravelSchedulePage',
  data() {
    return {
      schedules: [
        {
          image: '/static/images/rome.jpg',
          status: 'Upcoming',
          title: 'City Rome',
          location: 'Italy',
          date: 'May 15-20, 2024'
        },
        {
          image: '/static/images/santorini.jpg',
          status: 'Upcoming',
          title: 'Santorini Island',
          location: 'Greece',
          date: 'June 1-6, 2024'
        }
      ]
    }
  }
}
</script>

<style>
.schedule-page {
  font-family: 'Poppins', sans-serif;
  background-color: #FFFFFF;
  min-height: 100vh;
  padding: 20px;
}

.header {
  margin-bottom: 30px;
  padding: 20px;
}

.title {
  font-size: 24px;
  font-weight: 600;
  color: #000000;
  margin-bottom: 20px;
}

.filter-section {
  display: flex;
  flex-direction: row;
  gap: 16px;
}

.filter-item {
  padding: 8px 16px;
  border-radius: 20px;
  background: #F0F0F0;
}

.filter-item.active {
  background: #24C690;
}

.filter-text {
  font-size: 14px;
  color: #89807A;
}

.filter-item.active .filter-text {
  color: #FFFFFF;
}

.schedule-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 0 20px;
  padding-bottom: 90px;
}

.schedule-card {
  background: #FFFFFF;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.08);
}

.schedule-image-container {
  position: relative;
  width: 100%;
  height: 200px;
}

.schedule-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.schedule-status {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.9);
  padding: 6px 12px;
  border-radius: 20px;
}

.status-text {
  font-size: 12px;
  font-weight: 600;
  color: #24C690;
}

.schedule-info {
  padding: 16px;
}

.schedule-title {
  font-size: 18px;
  font-weight: 600;
  color: #000000;
  margin-bottom: 12px;
}

.schedule-meta {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.schedule-location, .schedule-date {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
}

.location-icon, .calendar-icon {
  width: 16px;
  height: 16px;
  opacity: 0.5;
}

.location-text, .date-text {
  font-size: 14px;
  color: #89807A;
}

/* 底部菜单栏样式 */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: #FFFFFF;
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
  padding: 0 20px;
  box-shadow: 0px -2px 10px rgba(0, 0, 0, 0.05);
  border-top: 1px solid #F5F5F5;
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  position: relative;
}

.nav-icon {
  width: 28px;
  height: 28px;
  transition: all 0.3s ease;
}

.nav-text {
  font-size: 12px;
  font-weight: 500;
  color: #89807A;
  transition: all 0.3s ease;
}

.nav-item.active {
  transform: translateY(-2px);
}

.nav-item.active .nav-text {
  color: #26C992;
  font-weight: 600;
}

.nav-item.active .nav-icon {
  opacity: 1;
  transform: scale(1.1);
}

.nav-item:not(.active) .nav-icon {
  opacity: 0.5;
}

.nav-item:active {
  transform: scale(0.95);
}
</style> 